import pytest,time
from Base import Base
from Page import Page
from selenium import webdriver

@pytest.fixture(scope='session')
def driver():
    driver = webdriver.Edge()
    driver.maximize_window()
    driver.get('https://re.m.jd.com/page/homelike?ad_od=3&re_dcp=21Sm2D2ZOw&traffic_source=1004&bd_vid=97b8f54028faf977&cu=true&utm_source=haosou-search&utm_medium=cpc&utm_campaign=t_262767352_haosousearch&utm_term=72869223856_0_384b6ca096874449bf489dc62b25aed9')
    driver.implicitly_wait(10)
    yield driver
    time.sleep(2)
    driver.quit()

def test_01(driver):
    po = Page(driver)
    po.luoji_01_search(driver)